function beforeRegister({
	userRecord,
	clientInfo
} = {}) {

	if (!userRecord.nickname) {
		console.log(".............nickname.................", userRecord.nickname);
		userRecord.nickname = "匿名" + Math.random().toString(36).substring(3, 9);
	}else{
		console.log(">>>>>>>>>>>>>nickname.................", userRecord.nickname);
	}

	// if (clientInfo.appId === '__UNI_123123') {
	// 	if (userRecord.role) {
	// 		userRecord.role.push('teacher')
	// 	} else {
	// 		userRecord.role = ['teacher']
	// 	}
	// }
	return userRecord // 务必返回处理后的userRecord
}

module.exports = {
	beforeRegister
}